package com.my.controller;

import com.my.result.Result;
import com.my.service.UserService;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 用户表(User)表控制层
 *
 * @author makejava
 * @since 2022-04-11 09:32:35
 */
@RestController
@RequestMapping("/user")
public class UserController{

    @Autowired
    private UserService userService;


    @RequiresPermissions("user:*")
    @RequiresAuthentication
    @GetMapping("/dashboard")
    public Result getUser(){
        return Result.okResult(userService.getUser());
    }

}
